package com.mgl.movesprite;

import org.andengine.entity.scene.Scene;
import org.andengine.entity.sprite.AnimatedSprite;
import org.andengine.entity.sprite.vbo.ITiledSpriteVertexBufferObject;
import org.andengine.opengl.texture.region.ITiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

import com.mgl.movesprite.game.factory.GameObjectFactory;
import com.mgl.movesprite.game.factory.GameType;
import com.mgl.movesprite.game.model.Level;
import com.mgl.util.ButtonSpriteListener;

public class EntityAnimatedSpriteLevelBase extends AnimatedSprite implements IEntityLevel {
	
	protected ButtonSpriteListener buttonSpriteListener = null;
	protected GameObjectFactory gameObjectFactory;
	protected GameType type;

	public EntityAnimatedSpriteLevelBase(float pX, float pY,
			ITiledTextureRegion pTiledTextureRegion,
			VertexBufferObjectManager pVertexBufferObjectManager,GameObjectFactory gameObjectFactory) {
		super(pX, pY, pTiledTextureRegion, pVertexBufferObjectManager);

		this.gameObjectFactory =gameObjectFactory;
		
	}

	@Override
	public void update(float pSecondsElapsed, Level level) {
		// TODO Auto-generated method stub
		
	}

	public ButtonSpriteListener getButtonSpriteListener() {
		return buttonSpriteListener;
	}

	public void setButtonSpriteListener(ButtonSpriteListener buttonSpriteListener) {
		this.buttonSpriteListener = buttonSpriteListener;
	}

	public GameObjectFactory getGameObjectFactory() {
		return gameObjectFactory;
	}

	public void setGameObjectFactory(GameObjectFactory gameObjectFactory) {
		this.gameObjectFactory = gameObjectFactory;
	}

	public GameType getType() {
		return type;
	}

	public void setType(GameType type) {
		this.type = type;
	}

	@Override
	public void detachFromScene(Scene scene) {
		scene.detachChild(this);
		
	}

	@Override
	public void attachToScene(Scene scene) {
		scene.attachChild(this);
		
	}
	
}
